package com.jshcbd.modules.asset.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jshcbd.framework.annotation.Dict;
import com.jshcbd.framework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author zhoucd
 * @date
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel( description = "盘点明细")
public class InventoryItemVo implements Serializable {
    private static final long serialVersionUID = 1L;


    private String id;

    @ApiModelProperty(value = "主表ID")
    @NotNull
    private String mainId;


    private String assetId;


    @ApiModelProperty(value = "资产照片")
    private String  photo;

    @ApiModelProperty(value = "资产盘点照片")
    private String  inventoryPhoto;



    @ApiModelProperty(value = "备注")
    private String  note;


    @ApiModelProperty(value = "资产购买单位")
    @NotNull
    private String buyer;


    @ApiModelProperty(value = "资产计量单位")
    @NotNull
    private String unit;

    @ApiModelProperty(value = "资产型号")
    @NotNull
    private String model;


    @ApiModelProperty(value = "资产使用年限")
    @NotNull
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date usefulLife;



    @ApiModelProperty(value = "供应商")
    @NotNull
    private String manufacturer;


    @ApiModelProperty(value = "是否含税")
    @NotNull
    private Boolean isFax;

    @ApiModelProperty(value = "是否属于固定资产")
    @NotNull
    private Boolean isFixed;

    @ApiModelProperty(value = "资产使用时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startUsetime;


    @ApiModelProperty(value = "资产领用ID")
    private String receiveId;

    @ApiModelProperty(value = "资产分类ID")
    private String classesId;

    @ApiModelProperty(value = "rfid")
    private String rfid;

    @ApiModelProperty(value = "处置时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date disDate;

    @ApiModelProperty(value = "领用人")
    private String receiver;

    @ApiModelProperty(value = "联系电话")
    private String telphone;

    @ApiModelProperty(value = "领取公司ID")
    private String companyId;

    @ApiModelProperty(value = "归还日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dueDate;


    @ApiModelProperty(value = "领用备注")
    private String receiveNote;

    @ApiModelProperty(value = "资产分类编码")
    private String code;

    @ApiModelProperty(value = "资产大类")
    private String classes;

    @ApiModelProperty(value = "资产分类名称")
    private String typeName;

    @ApiModelProperty(value = "折旧总月数")
    private Integer depreciationMonth;

    //---------------------  Excel导出字段 --------------------

    @ApiModelProperty(value = "资产ID")
    @NotNull
    @Excel(name="资产ID")
    private String number;


    @ApiModelProperty(value = "资产名称")
    @NotNull
    @Excel(name="资产名称")
    private String name;


    @ApiModelProperty(value = "合同编号")
    @NotNull
    @Excel(name="合同编号")
    private String contractNamber;


    @ApiModelProperty(value = "批次")
    @NotNull
    @Excel(name="批次")
    private String batch;

    @ApiModelProperty(value = "入库日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull
    @Excel(name="入库日期", format = "yyyy-MM-dd")
    private Date inDate;


    @ApiModelProperty(value = "价格")
    @NotNull
    @Excel(name="价格",numFormat = "0.00")
    private BigDecimal price;


    @ApiModelProperty(value = "领用公司名称")
    @Excel(name="领用公司名称")
    private String companyName;


    @ApiModelProperty(value = "单位楼")
    @Excel(name="建筑楼",replace={"腾飞大厦A_1","腾飞大厦B_2","腾飞大厦C_3","腾飞大厦D_4"})
    @Dict(dicCode = "building")
    private Integer locationBuilding;


    @ApiModelProperty(value = "楼层")
    @Excel(name="楼层")
    private Integer locationFloor;

    @ApiModelProperty(value = "房间名称")
    @Excel(name="房间名称")
    private String roomName;

    @ApiModelProperty(value = "资产状态(1:闲置/2:已领用/3:已处置),默认闲置")
    @Excel(name="资产状态",replace={"闲置_1","已领用_2","已处置_3"})
    private Integer state;

    @ApiModelProperty(value = "资产使用状态（1:正常使用/2:损坏）,默认正常使用")
    @Excel(name="资产使用状态",replace={"正常使用_1","损坏_2"})
    private Integer useState;


    @ApiModelProperty(value = "盘点状态（1:未盘/2:已盘/3:盘盈）")
    @Excel(name="盘点结果",replace={"盘亏_1","已盘_2","盘盈_3"})
    private Integer itemState;

}


